home *** CD-ROM | disk | FTP | other *** search
/ PC World Interactive 7 / PC World Interactive 7.iso / program / vbkontrol.exe / UDP_101N.ZIP / BRDCAST.FRM (.txt) next >
Encoding:
Visual Basic Form  |  1995-04-04  |  2.0 KB  |  65 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "UDP Broadcast Demo"
  4.    ClientHeight    =   5175
  5.    ClientLeft      =   1305
  6.    ClientTop       =   2055
  7.    ClientWidth     =   7845
  8.    ForeColor       =   &H00000000&
  9.    Height          =   5580
  10.    Left            =   1245
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   5175
  13.    ScaleWidth      =   7845
  14.    Top             =   1710
  15.    Width           =   7965
  16.    Begin CommandButton Command2 
  17.       Caption         =   "Clear"
  18.       Height          =   375
  19.       Left            =   5880
  20.       TabIndex        =   2
  21.       Top             =   300
  22.       Width           =   1335
  23.    End
  24.    Begin CommandButton Command1 
  25.       Caption         =   "Test!!"
  26.       Height          =   375
  27.       Left            =   4440
  28.       TabIndex        =   0
  29.       Top             =   300
  30.       Width           =   1335
  31.    End
  32.    Begin UDPPORT UDPPort1 
  33.       InBufferSize    =   2048
  34.       Left            =   3480
  35.       LocalPort       =   0
  36.       OutBufferSize   =   2048
  37.       RemoteHost      =   "255.255.255.255"
  38.       RemotePort      =   0
  39.       Top             =   720
  40.    End
  41.    Begin Label Label2 
  42.       Caption         =   "This demo will poll every UNIX host on the local net for DayTime (port 13)"
  43.       ForeColor       =   &H000000FF&
  44.       Height          =   255
  45.       Left            =   120
  46.       TabIndex        =   1
  47.       Top             =   60
  48.       Width           =   7695
  49.    End
  50. Sub Command1_Click ()
  51. UDPPort1.Active = True
  52. UDPPort1.RemoteHost = "255.255.255.255" 'broadcast address
  53. UDPPort1.RemotePort = 13 'daytime
  54. UDPPort1.DataToSend = "!" ' just send something!!
  55. End Sub
  56. Sub Command2_Click ()
  57. Cls: Print : Print : Print : Print
  58. End Sub
  59. Sub Form_Load ()
  60. Cls: Print : Print : Print : Print
  61. End Sub
  62. Sub UDPPort1_DataIn (Datagram As String, SourceAddress As String, SourcePort As Integer)
  63. Print "From: " & SourceAddress & " :: " & Datagram
  64. End Sub
  65.